// Author: wsfuyibing <682805@qq.com>
// Date: 2025-04-28

package kind

// UserState
// 用户状态.
type UserState int

const (
	_ UserState = iota

	UserStateNormal    // 正常
	UserStateLocked    // 锁定
	UserStateForbidden // 禁止
)

var (
	UserStateText = map[UserState]string{
		UserStateNormal:    "正常",
		UserStateLocked:    "锁定",
		UserStateForbidden: "禁止",
	}
	UserStateUnknown = ""
)

func (o UserState) IsNormal() bool    { return o == UserStateNormal }
func (o UserState) IsLocked() bool    { return o == UserStateLocked }
func (o UserState) IsForbidden() bool { return o == UserStateForbidden }

func (o UserState) Text() string {
	if str, ok := UserStateText[o]; ok {
		return str
	}
	return UserStateUnknown
}
